using System.ComponentModel;

namespace visualtwimilar
{
	public class UserShape : INotifyPropertyChanged
	{
		public UserShape(string name)
		{
			Name = name;
		}

		public string Name { get; private set; }
		private double _left;
		public double Left
		{
			get { return _left; }
			set
			{
				_left = value;
				OnPropertyChanged("Left");
			}
		}

		private double _top;
		public double Top
		{
			get { return _top; }
			set
			{
				_top = value;
				OnPropertyChanged("Top");
			}
		}

		#region OnPropertyChanged
		public event PropertyChangedEventHandler PropertyChanged;

		private void OnPropertyChanged(string name)
		{
			if (PropertyChanged != null)
				PropertyChanged.Invoke(this, new PropertyChangedEventArgs(name));
		}

		#endregion

	}
}